import QtQuick
import QtQuick.Controls
import QtQuick.Layouts

Window {
    width: 500
    height: 500
    visible: true
    title: qsTr("日历展示")
    color: "#f5f5f5"

    ListView {
        id: listview

        width: 200; height: 200
        snapMode: ListView.SnapOneItem
        orientation: ListView.Horizontal
        highlightRangeMode: ListView.StrictlyEnforceRange

        model: CalendarModel {
            from: new Date(2015, 0, 1)
            to: new Date(2015, 1, 0)
        }

        delegate: MonthGrid {
            width: listview.width
            height: listview.height

            month: model.month
            year: model.year
            locale: Qt.locale("en_US")
        }

        ScrollIndicator.horizontal: ScrollIndicator { }
    }

}
